﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Reflection;

namespace ProjectManagement.Web.Models
{
	public class FlexigridListHelper
	{
		public static List<string> GetPropertyList(object obj)
		{
			List<string> propertyList = new List<string>();

			Type type = obj.GetType();
			PropertyInfo[] properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public);
			foreach (PropertyInfo property in properties)
			{
				object o = property.GetValue(obj, null);
				propertyList.Add(o == null ? "" : o.ToString());
			}

			return propertyList;
		}

	}
}